import { getFavorAll, getFavorHistoryAll } from "@/services";
import { defineStore } from "pinia";

const useFavorStore = defineStore("favor", {
    state: () => ({
        favorlist: [],
    }),
    actions: {
        async fetchFavorlistData() {
            const res = await getFavorAll()
            this.favorlist = res.data.data.items
        },
        async fetchFavorHistorylistData() {
            const res = await getFavorHistoryAll()
            this.favorlist= res.data.data.items
        }
    }
})

export default useFavorStore

